package com.yunshan.welfare.service;

import com.yunshan.member.domain.MemberUserInfo;
import com.yunshan.welfare.domain.WelfareCouponRecord;

import java.util.Date;
import java.util.List;

/**
 * 优惠券发放详情Service接口
 *
 * @author yunshan
 * @date 2025-01-20
 */
public interface IWelfareCouponRecordService
{
    /**
     * 查询优惠券发放详情
     *
     * @param id 优惠券发放详情主键
     * @return 优惠券发放详情
     */
    public WelfareCouponRecord selectWelfareCouponRecordById(Long id);

    /**
     * 查询优惠券发放详情列表
     *
     * @param welfareCouponRecord 优惠券发放详情
     * @return 优惠券发放详情集合
     */
    public List<WelfareCouponRecord> selectWelfareCouponRecordList(WelfareCouponRecord welfareCouponRecord);

    /**
     * 新增优惠券发放详情
     *
     * @param welfareCouponRecord 优惠券发放详情
     * @return 结果
     */
    public List<String> insertWelfareCouponRecord(WelfareCouponRecord welfareCouponRecord, List<Long> ids);

    /**
     * 修改优惠券发放详情
     *
     * @param welfareCouponRecord 优惠券发放详情
     * @return 结果
     */
    public int updateWelfareCouponRecord(WelfareCouponRecord welfareCouponRecord);

    /**
     * 批量删除优惠券发放详情
     *
     * @param ids 需要删除的优惠券发放详情主键集合
     * @return 结果
     */
    public int deleteWelfareCouponRecordByIds(Long[] ids);

    /**
     * 删除优惠券发放详情信息
     *
     * @param id 优惠券发放详情主键
     * @return 结果
     */
    public int deleteWelfareCouponRecordById(Long id);

    /**
     * 批量发放优惠券
     * @param couponId 优惠券id
     * @param userList 用户信息
     * @param endTimes 过期时间
     * @return 结果
     */
    int batchInsertCouponRecords(Long couponId, List<MemberUserInfo> userList, String endTimes , Integer num);

    /**
     * 优惠券失效
     * @return 结果
     */
    int updateWelfareCouponRecordStatus();

    /**
     * 副卡查询已使用或已取消的优惠券
     * @param welfareCouponRecord 优惠券
     * @return 结果
     */
    List<WelfareCouponRecord> selectWelfareCouponSubList(WelfareCouponRecord welfareCouponRecord);

    /** 小程序券不分组 */
    List<WelfareCouponRecord> selectWelfareCouponRecordQuery(WelfareCouponRecord welfareCouponRecord);

    Integer selectWelfareCouponRecordCount(WelfareCouponRecord welfareCouponRecord);
}
